package com.haochu.novel.util;

import android.annotation.SuppressLint;
import java.text.SimpleDateFormat;


/**
 * @author fuhuichao
 * 2017年6月22日16:58:12
 * 常量类
 */
@SuppressLint("SimpleDateFormat") 
public class Constants {

	// 系统时间格式化
	public static SimpleDateFormat dateFormat_Hm = new SimpleDateFormat("HH:mm");
	
	// 小说内容和标题的默认字体大小
	public static float DEFAULT_BOOKCONTENT_TEXTSIZE = 30f;
	public static float DEFAULT_BOOKTITLE_TEXTSIZE = 25f;
	
	// 默认行距
	public static float DEFAULT_BOOKCONTENT_SPACING = 10f;
	
	// 默认边距
	public static float DEFAULT_BOOKCONTENT_MARGINTOP = 20f;
	public static float DEFAULT_BOOKCONTENT_MARGINBOTTOM = 20f;
	public static float DEFAULT_BOOKCONTENT_MARGINLEFT = 0f;
	public static float DEFAULT_BOOKCONTENT_MARGINRIGHT = 0f;
	public static float DEFAULT_BOOKCONTENT_PADDINGTOP = 60f;
	public static float DEFAULT_BOOKCONTENT_PADDINGBOTTOM = 60f;
	public static float DEFAULT_BOOKCONTENT_PADDINGLEFT = 30f;
	public static float DEFAULT_BOOKCONTENT_PADDINGRIGHT = 30f;
	
	// 默认编码
	public static String DEFAULT_CHARSET = "GBK";
	
	// 定义字体范围
	public static final float FONT_SIZE_MIN = 12f;
	public static final float FONT_SIZE_MAX = 80f;
	
	// 定义字体变化
	public static final int FONT_SIZE_SMALLER = 0;
	public static final int FONT_SIZE_BIGGER = 1;
	
	// 每次变化的字体大小步长
	public static final float FONT_SIZE_STEP = 2f;
	
	// 缓存文件名
	public static String REFERENCE_FILENAME = "com.haochu.novel"; 
	
	// 正则表达式智能断章
	public static String REGEX_PATTERN_CATEGORY = "第([\u4e00-\u9fa5]|[0-9]){1,8}(卷|篇|章).{0,}\r\n";
	
	// 正则表达式去除段首空白字符
	public static String REGEX_PATTERN_PARAGRAGH = "^(\t| ){0,}";
	
	// 正则表达式去除章节目录的回车
	public static String REGEX_PATTERN_SECTITLE = "(\r\n)|\n|\r";
	
	// 首行缩进字符
	public static String FIRST_LINE_INDENT = "\u3000\u3000";
	
	// 目录章节返回代码
	public static final int RESULT_CODE_CATEGORY = 1000;
	public static final int RESULT_CODE_DIRECTORY = 1001;
	public static final int REQUEST_CODE_ACTIVITY = 1;
	
	// 目录章节返回字段key
	public static final String RESULT_KEY_CATEGORY = "category_position";
	
	// 缓存文件参数
	public static final String PREFERENCE_KEY_TEXTSIZE = "_textSize";
	public static final String PREFERENCE_KEY_MBBINDEX = "_mbbIndex";
	public static final String PREFERENCE_KEY_PAGETOTAL = "_pageTotal";
	public static final String PREFERENCE_KEY_PAGENUMBERKEY = "_pageNumberKey";
	public static final String PREFERENCE_KEY_PAGENUMBERVALUE = "_pageNumberValue";
	
	// 文件目录类型
	public static enum DIRECTORY_TYPE{
		dir, file;
	}
}
